#include "threadpool.h"

int threadpoolInit(threadpool_t *threadpool,int workNum){
    threadpool=(threadpool_t *) calloc(1,sizeof(threadpool_t));
    Queinit(&threadpool->taskArr);
    tidArrinit(threadpool->tidArr,workNum);
    pthread_cond_init(&threadpool->cond,NULL);
    pthread_mutex_init(&threadpool->mutex,NULL);
    return 1;
}